<%-- 
    Document   : editIssue
    Created on : Mar 6, 2014, 7:17:27 AM
    Author     : bamidei
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link rel="stylesheet" type="text/css" href="./BugTrackcss.css">
        <title>Team-A BugTracker - Enter/Update Issue</title>
    </head>
    <body><div id="maincontainer">
            <div id="topsection"><div class="innertube"><
                </div></div>
            <div id="contentwrapper">
                <div id="contentcolumn"> <div class="innertube">
                          <h2>Enter/Update Issue Information</h2>
                        <div id="formarea">                    
                            <input type="button" value="Logout" onclick="window.location = 'Logout'">&nbsp;&nbsp;
                            <input type="button" value="Issue List" onclick="window.location = 'getIssueList'">

                            <hr>Enter Issue Information and Submit when complete:<br>
                            <form name="updateIssue" action="updateIssue">
                                Select Application/Version: <select name="appId">
                                    <c:forEach items="${appList}" var="App">
                                        <option value="${App.appId}" <c:if test="${activeIssue.appId == App.appId}"> selected="selected"</c:if>> ${App.name}/${App.version}</option>    
                                    </c:forEach>
                                </select><br>

                                Brief Summary:<br><input type="text" size="100" name="summary" value="${activeIssue.issueSummary}"><br>
                                Detailed Description:<br>
                                <textarea rows="4" cols="115" name="description">${activeIssue.issueDesc}</textarea>
                                <br>
                                Severity Code : <select name="priorityId">
                                    <c:forEach items="${priList}" var="Pri">
                                        <option value="${Pri.priorityId}" <c:if test="${activeIssue.priorityId == Pri.priorityId}"> selected="selected"</c:if>> ${Pri.severity}</option>
                                    </c:forEach>
                                </select><br>

                                Select an Assignee: <select name="assignToId">
                                    <c:forEach items="${usrList}" var="Usr">
                                        <option value="${Usr.idUser}" <c:if test="${activeIssue.assignToId == Usr.idUser}"> selected="selected"</c:if>>${Usr.firstName} ${Usr.lastName}</option>
                                    </c:forEach>
                                </select> (or n-a to leave unassigned)<br>
                                Status: <select name="statusId">
                                    <c:forEach items="${statList}" var="Stat">
                                        <option value="${Stat.statusId}" <c:if test="${activeIssue.statusId == Stat.statusId}"> selected="selected"</c:if>>${Stat.status}</option>
                                    </c:forEach>
                                </select><br>
                                <br><input type="submit" value="Submit" name="updateIssue"></form>
                        </div>
                    </div> </div>
            </div>
            <div id="leftcolumn">
                <div class="innertube"> </div>
            </div>
            <div id="footer">Team A Java Programming II</div>
        </div>
    </body>
</html>

